<?php

$hostname = $_POST["fixed_ip_hostname"];
$ip = $_POST["fixed_ip"];
$mac = $_POST["fixed_ip_mac"];
$comentario = $_POST["fixed_ip_com"];

//para debug
/*
print $hostname ; 
print $ip ;
print $mac ;
print $comentario ;
*/


$dhcpd_database_file = 'dhcpd.sqlite' ;

$database = sqlite_open($dhcpd_database_file);

$insert_action = "INSERT INTO dhcpd VALUES ('$hostname','$ip','$mac','$comentario')";

$insert = sqlite_exec( $database , $insert_action , $insert_error );

if ( ! $insert ) {
	exit("Error in query: '$insert_error'");
} else {
   require("dhcpd.php");
}


?>